package com.sg.model.po;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sg.framework.common.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.util.Date;

/**
 * @author xxx
 */
@Data
@Accessors(chain = true)
@TableName("oms_scheme_open_record") //2-3-12方案开通记录表
public class OmsSchemeOpenRecord extends BaseEntity {
    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 开通钥匙ID
     */
    @TableId(value = "sch_open_record_id", type = IdType.ASSIGN_UUID)
    @NotNull(message = "schOpenRecordId不能为空")
    private String schOpenRecordId;
    /**
     * 开通钥匙标识
     */
    @TableField(value = "sch_open_record_code")
    @NotNull(message = "开通钥匙标识不能为空")
    @Schema(description = "开通钥匙标识")
    private String schOpenRecordCode;

    /**
     * 租户空间ID
     */
    @TableField(value = "tenant_space_id")
    @NotNull(message = "租户空间ID不能为空")
    @Schema(description = "租户空间ID")
    private String tenantSpaceId;

    /**
     * 配置方案ID
     */
    @TableField(value = "conf_scheme_id")
    @NotNull(message = "配置方案ID不能为空")
    @Schema(description = "配置方案ID")
    private String confSchemeId;
    /**
     * 配置方案标识
     */
    @TableField(value = "conf_scheme_code")
    @NotNull(message = "配置方案标识不能为空")
    @Schema(description = "配置方案标识")
    private String confSchemeCode;
    /**
     * 是否主配置方案 TRUE:是 FALSE:否
     */
    @TableField(value = "is_main_conf_scheme")
    @NotNull(message = "是否主配置方案不能为空")
    @Schema(description = "是否主配置方案")
    private String isMainConfScheme;

    /**
     * 授权类型 CYCLE_TIME:周期时间型 FIXED_TIME:固定时间型 QUANTITY:数量型
     */
    @TableField(value = "auth_type")
    @NotNull(message = "授权类型不能为空")
    @Schema(description = "授权类型")
    private String authType;

    /**
     * 授权使用类型 USABLE:可用 QUANTITY_INS_DISABLED:数量不足不可用 EXPIRE__DISABLED:到期不可用
     */
    @TableField(value = "auth_use_type")
    @Schema(description = "授权使用类型")
    private String authUseType;

    /**
     * 开通对象类型编码 TENANT_SPACE:租户空间 ORG:组织 EVA_THEME:评价主题 EVA_TEMP:评价模板 PLATFORM:平台
     */
    @TableField(value = "appl_obj_type")
    @Schema(description = "开通对象类型编码")
    private String applObjType;

    /**
     * 剩余授权数
     */
    @TableField(value = "remaining_qty")
    @Schema(description = "剩余授权数")
    private Long remainingQty;

    /**
     * 开始时间
     */
    @TableField(value = "start_time")
    @Schema(description = "开始时间")
    private Date startTime;
    /**
     * 结束时间
     */
    @TableField(value = "end_time")
    @Schema(description = "结束时间")
    private Date endTime;

    /**
     * 授权单位 YEAR:年 A:个 COVER:套
     */
    @TableField(value = "auth_unit")
    @Schema(description = "授权单位")
    private String authUnit;

    /**
     * 主体生命周期 CURRENTLY_VALID:当前有效 EDITING:正在编辑 ARCHIVING:历史存档
     */
    @TableField(value = "subject_life_cycle")
    @NotNull(message = "主体生命周期不能为空")
    @Schema(description = "主体生命周期")
    private String subjectLifeCycle;
    /**
     * 是否存档 TRUE:是 FALSE:否
     */
    @TableField(value = "is_archive")
    @NotNull(message = "是否存档不能为空")
    @Schema(description = "是否存档")
    private String isArchive;

    /**
     * 开通钥匙类型标识
     */
    @TableField(value = "authorization_key_type_code")
    @Schema(description = "开通钥匙类型标识")
    private String authorizationKeyTypeCode;

    /**
     * 操作人就职记录ID
     */
    @TableField(value = "operation_induction_id")
    @NotNull(message = "操作人就职记录ID不能为空")
    @Schema(description = "操作人就职记录ID")
    private String operationInductionId;
    /**
     * 创建人就职记录ID
     */
    @TableField(value = "create_induction_id")
    @NotNull(message = "创建人就职记录ID不能为空")
    @Schema(description = "创建人就职记录ID")
    private String createInductionId;
    /**
     * 发布人就职记录ID
     */
    @TableField(value = "release_induction_id")
    @Schema(description = "发布人就职记录ID")
    private String releaseInductionId;
    /**
     * 存档人就职记录ID
     */
    @TableField(value = "archive_induction_id")
    @Schema(description = "存档人就职记录ID")
    private String archiveInductionId;
    /**
     * 操作时间
     */
    @TableField(value = "operate_time")
    @NotNull(message = "操作时间不能为空")
    @Schema(description = "操作时间")
    private Date operateTime;
    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @NotNull(message = "创建时间不能为空")
    @Schema(description = "创建时间")
    private Date createTime;
    /**
     * 发布时间
     */
    @TableField(value = "release_time")
    @Schema(description = "发布时间")
    private Date releaseTime;
    /**
     * 存档时间
     */
    @TableField(value = "archive_time")
    @Schema(description = "存档时间")
    private Date archiveTime;
    /**
     * 是否作废 TRUE:是 FALSE:否
     */
    @TableField(value = "is_valid")
    @NotNull(message = "是否作废不能为空")
    @Schema(description = "是否作废")
    private String isValid;
    /**
     * 创建于空间ID
     */
    @TableField(value = "space_id")
    @NotNull(message = "创建于空间ID不能为空")
    @Schema(description = "创建于空间ID")
    private String spaceId;
    /**
     * 创建于联盟应用ID
     */
    @TableField(value = "app_id")
    @NotNull(message = "创建于联盟应用ID不能为空")
    @Schema(description = "创建于联盟应用ID")
    private String appId;
}
